<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @property int $id
 * @property int $pid 上级
 * @property string $content 内容
 * @property string $title 标题
 * @property-read \app\model\AutoReply $parent
 * @property-read \app\model\AutoReply[] $child
 * @mixin \think\Model
 */
class AutoReply extends Model
{
    //
	
	function child()
	{
		return $this->hasMany(AutoReply::class,'pid');
	}
	
	function parent()
	{
		return $this->belongsTo(AutoReply::class,'pid');
	}
}
